Optimal. Leaf size=98 \[ -\frac{a^3 \cot ^3(c+d x)}{3 d}-\frac{5 a^3 \cot (c+d x)}{d}+\frac{4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac{11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{3 a^3 \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.175406, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {2872, 3770, 3767, 8, 3768, 2648} \[ -\frac{a^3 \cot ^3(c+d x)}{3 d}-\frac{5 a^3 \cot (c+d x)}{d}+\frac{4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}-\frac{11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{3 a^3 \cot (c+d x) \csc (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2872
Rule 3770
Rule 3767
Rule 8
Rule 3768
Rule 2648
Rubi steps
\begin{align*} \int \csc ^4(c+d x) \sec ^2(c+d x) (a+a \sin (c+d x))^3 \, dx &=a^2 \int \left (4 a \csc (c+d x)+4 a \csc ^2(c+d x)+3 a \csc ^3(c+d x)+a \csc ^4(c+d x)-\frac{4 a}{-1+\sin (c+d x)}\right ) \, dx\\ &=a^3 \int \csc ^4(c+d x) \, dx+\left (3 a^3\right ) \int \csc ^3(c+d x) \, dx+\left (4 a^3\right ) \int \csc (c+d x) \, dx+\left (4 a^3\right ) \int \csc ^2(c+d x) \, dx-\left (4 a^3\right ) \int \frac{1}{-1+\sin (c+d x)} \, dx\\ &=-\frac{4 a^3 \tanh ^{-1}(\cos (c+d x))}{d}-\frac{3 a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac{4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}+\frac{1}{2} \left (3 a^3\right ) \int \csc (c+d x) \, dx-\frac{a^3 \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac{\left (4 a^3\right ) \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}\\ &=-\frac{11 a^3 \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac{5 a^3 \cot (c+d x)}{d}-\frac{a^3 \cot ^3(c+d x)}{3 d}-\frac{3 a^3 \cot (c+d x) \csc (c+d x)}{2 d}+\frac{4 a^3 \cos (c+d x)}{d (1-\sin (c+d x))}\\ \end{align*}
Mathematica [B] time = 6.14217, size = 211, normalized size = 2.15 \[ a^3 \left (\frac{7 \tan \left (\frac{1}{2} (c+d x)\right )}{3 d}-\frac{7 \cot \left (\frac{1}{2} (c+d x)\right )}{3 d}-\frac{3 \csc ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{3 \sec ^2\left (\frac{1}{2} (c+d x)\right )}{8 d}+\frac{11 \log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}-\frac{11 \log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{2 d}+\frac{8 \sin \left (\frac{1}{2} (c+d x)\right )}{d \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )}-\frac{\cot \left (\frac{1}{2} (c+d x)\right ) \csc ^2\left (\frac{1}{2} (c+d x)\right )}{24 d}+\frac{\tan \left (\frac{1}{2} (c+d x)\right ) \sec ^2\left (\frac{1}{2} (c+d x)\right )}{24 d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.128, size = 128, normalized size = 1.3 \begin{align*}{\frac{11\,{a}^{3}}{2\,d\cos \left ( dx+c \right ) }}+{\frac{11\,{a}^{3}\ln \left ( \csc \left ( dx+c \right ) -\cot \left ( dx+c \right ) \right ) }{2\,d}}+{\frac{13\,{a}^{3}}{3\,d\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }}-{\frac{26\,{a}^{3}\cot \left ( dx+c \right ) }{3\,d}}-{\frac{3\,{a}^{3}}{2\,d \left ( \sin \left ( dx+c \right ) \right ) ^{2}\cos \left ( dx+c \right ) }}-{\frac{{a}^{3}}{3\,d \left ( \sin \left ( dx+c \right ) \right ) ^{3}\cos \left ( dx+c \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01845, size = 216, normalized size = 2.2 \begin{align*} \frac{9 \, a^{3}{\left (\frac{2 \,{\left (3 \, \cos \left (d x + c\right )^{2} - 2\right )}}{\cos \left (d x + c\right )^{3} - \cos \left (d x + c\right )} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 6 \, a^{3}{\left (\frac{2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 36 \, a^{3}{\left (\frac{1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} - 4 \, a^{3}{\left (\frac{6 \, \tan \left (d x + c\right )^{2} + 1}{\tan \left (d x + c\right )^{3}} - 3 \, \tan \left (d x + c\right )\right )}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.18183, size = 887, normalized size = 9.05 \begin{align*} -\frac{104 \, a^{3} \cos \left (d x + c\right )^{4} + 38 \, a^{3} \cos \left (d x + c\right )^{3} - 156 \, a^{3} \cos \left (d x + c\right )^{2} - 42 \, a^{3} \cos \left (d x + c\right ) + 48 \, a^{3} + 33 \,{\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3} +{\left (a^{3} \cos \left (d x + c\right )^{3} + a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 33 \,{\left (a^{3} \cos \left (d x + c\right )^{4} - 2 \, a^{3} \cos \left (d x + c\right )^{2} + a^{3} +{\left (a^{3} \cos \left (d x + c\right )^{3} + a^{3} \cos \left (d x + c\right )^{2} - a^{3} \cos \left (d x + c\right ) - a^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 2 \,{\left (52 \, a^{3} \cos \left (d x + c\right )^{3} + 33 \, a^{3} \cos \left (d x + c\right )^{2} - 45 \, a^{3} \cos \left (d x + c\right ) - 24 \, a^{3}\right )} \sin \left (d x + c\right )}{12 \,{\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} +{\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) - d\right )} \sin \left (d x + c\right ) + d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.2463, size = 200, normalized size = 2.04 \begin{align*} \frac{a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 9 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 132 \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 57 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{192 \, a^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1} - \frac{242 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 57 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 9 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + a^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3}}}{24 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]